          SUBROUTINE (OID,GEN,PN,LDID,MSGS,RESPS)
** Version# 2 - 02/10/2002 - 11:32pm - ROBINN - develop

*** Subroutine - OE.CHK.DUP.LINES.ITEMS
*-------------------------------------------------------------------------*
*** This routine will check for any duplicate products on an order by
*** looping through the LDIDs. It was designed to be called from OE when a
*** new item is placed on the order to see if that item already exists on
*** the order, for all OPEN GENs.
*-------------------------------------------------------------------------*
*** OID         - Order ID                                         [IN]
*** GEN         - Generation ID                                    [IN]
*** PN          - The product on the line you are checking         [IN]
*** LDID        - The line item you are checking (if this is empty (IN)
***             - it is assumed you are checing a new line).
*** MSGS        - The actions array.                               [IN/OUT]
*** RESPS       - The responces array.                             [IN/OUT]
*-------------------------------------------------------------------------*
*** PHANTOM process friendly: YES
*** JAVA process friendly: YES
*-------------------------------------------------------------------------*

          *** First, check to see if this message has already been
          *** displayed.  And if so, don't show it twice...
          ACT.ID = 'OE.CHK.DUP.LINE.ITEMS'
          LOCATE ACT.ID IN RESPS<1> SETTING NOTHING THEN RETURN


          OE.GET.LDID.LIST LDID.LIST,OID,GEN
          LDID.CT = DCOUNT(LDID.LIST,VM)
          DUP.LN  = 0

          FOR LN = 1 TO LDID.CT
             TLDID = LDID.LIST<1,LN>
             IF TLDID # LDID THEN
                LD.READV CUR.PN,OID,TLDID,1
                IF PN = CUR.PN THEN
                   DUP.LN = LN
                   EXIT
                END
             END
          NEXT LN

          IF DUP.LN > 0 THEN
             READV PRD.DESC FROM PRDFILE,PN,1 ELSE PRD.DESC = ''

             MSG.ID    = '%66'
             MSG.ID<2> = PN
             MSG.ID<3> = PRD.DESC[1,30]
             MSG.ID<4> = DUP.LN
             ACTION.ADD.MSG MSGS,ACT.ID,,MSG.ID,,2,YES,3,9
          END

          RETURN
*-------------------------------------------------------------------------*
!ROBINN~02/10/02~23:32
